package fan.project1_SpeedTalkSystem.Model;

import lombok.Data;

import java.util.Date;

@Data
public class BlogInfo {
//    Field       | Type         | Null | Key | Default           | Extra                       |
//            +-------------+--------------+------+-----+-------------------+-----------------------------+
//            | id          | int(11)      | NO   | PRI | NULL              | auto_increment              |
//            | title       | varchar(200) | YES  |     | NULL              |                             |
//            | content     | text         | YES  |     | NULL              |                             |
//            | user_id     | int(11)      | YES  |     | NULL              |                             |
//            | delete_flag | tinyint(4)   | YES  |     | 0                 |                             |
//            | create_time | datetime     | YES  |     | CURRENT_TIMESTAMP |                             |
//            | update_time | datetime     | YES  |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
    private int id;
    private String title;
    private String content;
    private int  userId;
    private int deleteFlag;
    private Date createTime;
    private Date updateTime;
    private boolean isAuthor = false;

    public String getCreateTime() {
        return DateUtils.dateFormat(createTime);
    }



}
